.TH std::in_place,std::in_place_type,std::in_place_index,std::in_place_t, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::in_place,std::in_place_type,std::in_place_index,std::in_place_t, \- std::in_place,std::in_place_type,std::in_place_index,std::in_place_t,

.SH Synopsis

   Defined in header <utility>
   struct in_place_t { explicit in_place_t() = default; };            \fB(1)\fP \fI(since C++17)\fP
   inline constexpr std::in_place_t in_place {};                      \fB(2)\fP \fI(since C++17)\fP
   template< class T >                                                \fB(3)\fP \fI(since C++17)\fP
   struct in_place_type_t { explicit in_place_type_t() = default; };
   template< class T >                                                \fB(4)\fP \fI(since C++17)\fP
   inline constexpr std::in_place_type_t<T> in_place_type {};
   template< std::size_t I >
   struct in_place_index_t { explicit in_place_index_t() = default;   \fB(5)\fP \fI(since C++17)\fP
   };
   template< std::size_t I >                                          \fB(6)\fP \fI(since C++17)\fP
   inline constexpr std::in_place_index_t<I> in_place_index {};

   1,3,5) The type/type templates std::in_place_t, std::in_place_type_t and
   std::in_place_index_t can be used in the constructor's parameter list to match the
   intended tag.
   2,4,6) The corresponding std::in_place, std::in_place_type, and std::in_place_index
   instances of (1,3,5) are disambiguation tags that can be passed to the constructors
   of std::expected, std::optional, std::variant, and std::any to indicate that the
   contained object should be constructed in-place, and (for the latter two) the type
   of the object to be constructed.

.SH Standard library

   The following standard library vocabulary types use (1-6) as disambiguation tags:

   expected a wrapper that contains either an expected or error value
   (C++23)  \fI(class template)\fP
   optional a wrapper that may or may not hold an object
   \fI(C++17)\fP  \fI(class template)\fP
   variant  a type-safe discriminated union
   \fI(C++17)\fP  \fI(class template)\fP
   any      objects that hold instances of any CopyConstructible type
   \fI(C++17)\fP  \fI(class)\fP

.SH See also

   sorted_unique       indicates that elements of a range are sorted and unique
   sorted_unique_t     (tag)
   (C++23)
   sorted_equivalent   indicates that elements of a range are sorted (uniqueness is not
   sorted_equivalent_t required)
   (C++23)             (tag)
